<template>
  <div>
    <p @click="success">访问</p>
  </div>
</template>
<script>
import { Modal } from 'ant-design-vue';
import { defineComponent, h } from 'vue';
export default defineComponent({
  setup() {
    const info = () => {
      Modal.info({
        title: 'This is a notification message',
        content: h('div', {}, [h('p', 'some messages...some messages...'), h('p', 'some messages...some messages...')]),

        onOk() {
          console.log('ok');
        },

      });
    };

    const success = () => {
      Modal.success({
        title: 'This is a success message',
        content: h('div', {}, [h('p', 'some messages...some messages...'), h('p', 'some messages...some messages...')]),
      });
    };

    const error = () => {
      Modal.error({
        title: 'This is an error message',
        content: 'some messages...some messages...',
      });
    };

    const warning = () => {
      Modal.warning({
        title: 'This is a warning message',
        content: 'some messages...some messages...',
      });
    };

    return {
      info,
      success,
      error,
      warning,
    };
  },

});
</script>